objs := start.o clock.o sdram.o led.o

sdram.bin : $(objs)
	arm-linux-ld -Tsdram.lds -o sdram_elf $^
	arm-linux-objcopy -O binary -S sdram_elf $@
	arm-linux-objdump -D -m arm  sdram_elf > sdram.dis

%.o:%.c
	arm-linux-gcc -nostdlib -I./include -Wall -c -o $@ $<

%.o:%.S
	arm-linux-gcc -nostdlib -I./include -Wall -c -o $@ $<

clean:
	rm -f  sdram.dis sdram.bin sdram_elf *.o
